<html lang="en" xmlns:th="http://www.thymeleaf.org">
<footer class=site-footer th:fragment="footer">
  <section class=copyright>
    &copy; [[${theme.config.basic.copy ?: '2020 - 2022 '+site.title}]]
  </section>
  <section class=powerby>
<!--    Powered by GitHub.Pages-->
<!--    <br>-->
    Built with
    <a href=https://halo.run/ target=_blank rel=noopener>
      Halo
    </a>
    <br>
    主题
    <b>
      <a href=https://github.com/jiewenhuang/halo-theme-stack target=_blank rel=noopener
         data-version=3.16.0>
        Stack
      </a>
    </b>
    由
    <a href=https://jimmycai.com target=_blank rel=noopener>
      Jimmy
    </a>
    设计
    <span>
      <a href="https://github.com/jiewenhuang/halo-theme-stack" target=_blank rel=noopener>
              • 由Jiewen移植
      </a>
            </span>
  </section>
    <th:block th:if="${not #lists.isEmpty(theme.config.basic.icp)}">
  <section class=powerby>
<!--    <img th:src="@{/assets/img/icp.png}" alt width=15px height=15px>-->
    <a href="https://beian.miit.gov.cn/" target=_blank>
      [[${theme.config.basic.icp}]]
    </a>
    <!-- 在模板中声明一个变量用于存储总字数 -->


  </section>
    </th:block>

    <!-- 显示文章数和字数 -->
  <th:block th:with="posts = ${postFinder.listAll()}">
    <th:block th:with="articleCount=${posts.size()}, wordCount=0">
      <th:block th:each="post : ${posts}"
                th:with="content = ${postFinder.content(post.metadata.name)}">
        <th:block th:with="wordCount=${wordCount + (content.content!=null ? #strings.length(content.content) : 0)}">
        </th:block>
      </th:block>
      <section class=powerby>
        📑共水了 [[${articleCount}]]篇文章.
        <br>
      </section>
    </th:block>
  </th:block>
<!--    底部代码注入-->
    <halo:footer />

</footer>
</html>